package com.service.dao.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("hm_member_coupon")
public class MemberCoupon implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 记录主键
     */
    @TableId
    private Integer id;

    /**
     * 用户id
     */
    private Integer memberId;

    /**
     * 优惠券id
     */
    private Integer couponId;

    /**
     * 优惠券状态 -1:未使用 0:未到生效期 1:已使用 2:已过期
     */
    private Integer couponStatus;

    private Date startTime;

    private Date endTime;

    private Date createTime;

    private Date updateTime;

    /**
     * 优惠券币种id
     */
    @TableField(exist = false)
    private Integer coinsId;

    /**
     * 优惠券币种名称
     */
    @TableField(exist = false)
    private String coinsName;

    /**
     * 优惠券金额
     */
    @TableField(exist = false)
    private BigDecimal couponVal;
    /**
     * 优惠券限定使用的产品ID
     */
    @TableField(exist = false)
    private Integer productId;
}
